/*
 * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS HEADER.
 *
 * Copyright (c) 2013-2014 sagyf Yang. The Four Group.
 */

package com.ifonly.ext.shiro;

import com.ifonly.ext.shiro.auth.*;
import com.ifonly.ext.shiro.permission.HasAnyPermissionsTag;
import com.ifonly.ext.shiro.permission.HasPermissionTag;
import com.ifonly.ext.shiro.permission.LacksPermissionTag;
import com.ifonly.ext.shiro.role.HasAnyRolesTag;
import com.ifonly.ext.shiro.role.HasRoleTag;
import com.ifonly.ext.shiro.role.LacksRoleTag;
import freemarker.template.SimpleHash;

/**
 * @author <a href="mailto:ifonlymaster@163.com">ifonly</a>
 * @version 1.0 2015-12-16 16:07
 * @since JDK 1.6
 */
public class ShiroTags extends SimpleHash {
    private static final long serialVersionUID = 6061767121745255167L;

    public ShiroTags() {
        put("authenticated", new AuthenticatedTag());
        put("guest", new GuestTag());
        put("hasAnyRoles", new HasAnyRolesTag());
        put("hasPermission", new HasPermissionTag());
        put("hasAnyPermissions", new HasAnyPermissionsTag());
        put("hasRole", new HasRoleTag());
        put("lacksPermission", new LacksPermissionTag());
        put("lacksRole", new LacksRoleTag());
        put("notAuthenticated", new NotAuthenticatedTag());
        put("principal", new PrincipalTag());
        put("user", new UserTag());
    }
}
